getwd()
episode_data_wo_CI <- get_episode_wo_CI()
episode_data <- EpisodeR::get_episode()
#--------------------------------------------------#
#   AFI Four-item construction                     #
#--------------------------------------------------#
#### Preliminaries ####
R.version$version.string
# clear workspace
rm(list=ls())
# load packages
library(here)
library(tidyverse)
library(rworldmap) # maps
library(magrittr)
library(reshape2)
library(ggpubr)
library(leaflet)
library(plotly)
library(gapminder)
library(countrycode)
library(ggrepel)
library(ggthemes)
library(lubridate)
library(dotwhisker)
library(coda)
library(MASS)
library(rjags)
library(parallel)
library(magrittr)
library(dplyr)
library(tools)
library(devtools)
## Install local v-dem tools package
devtools::install_local("vutils")
library(vutils)
INDIR <- "data/bfa/input"
OUTDIR <- "results"
UTABLE <- "data/bfa/country_unit.rds"
dir.create(OUTDIR, showWarnings = F, recursive = T)
stopifnot(dir.exists(INDIR))
getwd()
